#include "stdafx.h"
#include "Controller.h"
#include "View.h"
#include <sstream>
#include <time.h>

using namespace std;

Controller* Controller::m_pInstance = nullptr;

Controller::Controller()
{
}

Controller::~Controller()
{
}

Controller * Controller::getInstance()
{
	if (m_pInstance == nullptr)
		m_pInstance = new Controller();

	return m_pInstance;
}

void Controller::run()
{
	View::getInstance()->showLogOnMenu();
}

std::string Controller::getCurrentDate()
{
	time_t now = time(0);
	struct tm time;

	localtime_s(&time, &now);

	//stringstream ss;
	//ss << time.tm_year + 1900 << "/"
	//	<< time.tm_mon + 1 << "/"
	//	<< time.tm_mday;

	//return ss.str();
	return "";
}
